﻿
<?php

	//SDK调用示例程序
	include "./SDK/Utils.php";
	include "./SDK/client.php";
	include "./SDK/OrderSubmitRequest.php";

	$appKey="lw7793155";//appKey 请向业务员索取
	$appSecret="lw77931551";//Secret  请向业务员索取
	$serverUrl="http://ceshi.kongbao100.com/OrderSubmit/index.asp";
	

	//测试环境 
	$client = new DJYClient($appKey,$appSecret,$serverUrl);
	$client->isDebug=false;

	
	//订单提交调用示例
	$order=new Getprices(); //这里随便
	$order->Platform="allkd"; //如果获取所有快递价格填写 "allkd" ，单个快递请直接输入代称如 "龙邦"
	$order->Adminikey="5343111"; //如果需要获取后台余额,或者获取快递成本价，这里一定需要正确,如果没有请留空 如 $order->Adminikey=""
	

	$orderSubmitRequest = new OrderSubmitRequest();
	$orderSubmitRequest->setLogiType("getprice");//物流公司类型 可选值。4:圆通
	$orderSubmitRequest->setOrders($order);//订单数据集合 支持批量提交
	
	$orderSubmitRsp = $client->execute($orderSubmitRequest);
	echo "<br/>";
	//echo   encode_json($orderSubmitRsp);
	echo "========购买空包";
	echo "<br/>";
	echo  $orderSubmitRsp;
	echo "<br/>";






